class Allcourse:
    course1 = "语文"
    course2 = "数学"
    course3 = "英语"
    way1 = "靠背"
    def __init__(self):
        print("我会的课程："+Allcourse.course1+Allcourse.course2+Allcourse.course3)
    def __way__(self,way1):
        print("做这些课程的方法：" + way1)
class Like(Allcourse):
    course4 = "物理"
    way1 = "靠懂"
    def __way__(self,way1):
        print("做这些课程的方法是" + way1)
like = Like()
like.__way__(like.way1)
